package com.tj.jinzao.activity;

import android.support.v4.app.Fragment;
import android.view.View;

import com.tj.jinzao.R;
import com.tj.jinzao.base.BaseActivity;
import com.tj.jinzao.fragment.ZXSFragment;

public class ZXSActivity extends BaseActivity {
    private ZXSFragment zxsFragment;
    @Override
    public int getLayoutResource() {
        return R.layout.activity_zxs;
    }
    @Override
    protected Fragment createFragment() {
        zxsFragment=ZXSFragment.newInstance();
        return zxsFragment;
    }

    @Override
    protected void setupView() {
        findViewById(R.id.back_lay).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();

            }
        });
        findViewById(R.id.config).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if(getIntent()!=null&&getIntent().getStringExtra("nickName")!=null){
                    zxsFragment.configChat(getIntent().getStringExtra("nickName"),getIntent().getStringExtra("userId"));
                }else {
                    zxsFragment.configChat("","");
                }


            }
        });
    }
}
